package net.butov.wrappers;

import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.Arrays;

/**
 * @author Maxim Butov
 * @version $Id$
 */
public enum WrapperMode {

    DECLARED {
        public boolean shouldWrap(Class clazz, Method method) {
            return Arrays.asList(clazz.getDeclaredMethods()).contains(method);
        }
    },

    NON_ABSTRACT {
        public boolean shouldWrap(Class clazz, Method method) {
            return !Modifier.isAbstract(method.getModifiers());
        }
    },;

    public abstract boolean shouldWrap(Class clazz, Method method);
}
